After completing this lesson, you’ll be able to:
As a technical analyst in the GIS department of your local city, you have plenty of experience using FME Desktop and are just getting started with FME Server.
Other departments frequently ask the GIS team for orthophoto imagery of the city. Their format of choice is usually JPEG. Currently, you use an FME Desktop workspace to translate the data, adding to your workspace any special requests they have such as a particular resolution, a specific area of interest, or even sets of vector data stamped onto the raster.
However good you are with FME Workbench, it does take time to set up each of these individual requests. It would be far better if the other departments could help themselves to the raster data, with options for all of their special requests built-in.
You realize that a Data Download system implemented on FME Server would be an ideal solution. In this exercise, you will take an existing workspace and publish it for simple self-serve.
Open the starting workspace using FME Workbench (2022.0 or later). If you examine the reader, transformers, and writers, you will see that this workspace:
If this workspace is published to FME Server as is, users will be able to select the GeoTIFF files they wish to convert to JPEG and receive the results in a zipped folder.
It is usually a good idea to save and run a workspace locally before publishing to FME Server. Running now will help you identify any errors.
Click the Save button. Save the workspace wherever you wish. Then click the Run button. When the translation is finished with no errors, click the Open Containing Folder button on your writer feature type. The written data should be a JPEG file (06_07_LM.jpg) along with a world file (06_07_LM.wld).
Now publish the workspace to FME Server. Register it with the Data Download service.
Log in to the FME Server web interface, locate the workspace, and run it.
The workspace will run and you will be presented with a hyperlink to a ZIP file of the output dataset:
Click the link to download the ZIP file. You should find it contains the same files (06_07_LM.jpg and 06_07_LM.wld) as when you ran the workspace locally.
Sometimes the end-users download data as JPEG just to open it in a browser or image viewer to inspect it. You realize that, in cases like this, they may be able to use a data streaming service, instead of a data download.
Let's try publishing the workspace under the Data Streaming service. When we use this service, the JPEG result of the translations should stream back to the user. Depending on their operating system and browser configuration, it will either download directly as a file or be displayed in the browser.
Publish the workspace to FME Server.
In the final dialog of the publishing wizard, check the boxes to register the workspace with both Data Download and Data Streaming (but don't click Finish yet):
Click the Edit button for the Data Streaming service. Ensure that the service is using the output of the JPEG Writer (for now we're limiting the streaming of data to JPEG format):
In the FME Server web interface, locate the newly published workspace and run it. In the parameters for the workspace, be sure to set the web service to Data Streaming instead of Data Download:
You should find that the results of the translation are returned as a streamed JPEG file. Most likely it will open directly in your web browser: